home *** CD-ROM | disk | FTP | other *** search
- BCHANGE.EXE (c)1989 DMA, P.O. Box 390, Mountlake Terrace, WA 98043
- Version 1.1
-
-
- WHAT IT IS
-
- BCHANGE is designed to change a string of bytes in either a text or a binary
- file. The data to be changed can be specified in either string or hexadecimal
- form. A quick operational summary of BCHANGE can be displayed by typing
- BCHANGE at the DOS prompt.
-
-
- OPERATION
-
- BCHANGE is invoked with the following command line:
-
- BCHANGE from_file to_file "from_string" "to_string" [/b] [/i]
-
- Field Description
-
-
- ------------- ---------------------------------------------------
-
-
- from_file This is the original file. It may be qualified
- a drive, path name and extension if necessary.
-
-
- to_file This is the destination file. It may also be
- qualified as necessary. In addition, it may be
- the same file as from_file. In this case, BCHANGE
- will write to a temporary file to do its
- processing. When the program is done, BCHANGE
- will delete the original file and rename the
- temporary file.
- If BCHANGE is interrupted before completing its
- task, the program will notify you of the name of
- the temporary file before terminating.
-
-
- "from_string" This is the string for which you are searching.
- If you are operating in text mode (the default),
- this is the quoted string of characters for which
- you are searching, like this:
- "This is bad text"
- These are the characters you want to remove from
- the file. This search is case sensitive, and will
- catch only an exact match.
- The quote marks are optional if there are no
- spaces embedded in the string.
-
-
- "to_string" This is the replacement string. It is
- specified the same way the from_string is, with
- one exception: a null string ("") is allowed.
- A null string will simply delete all occurances of
- the from_string.
-
-
- /b This switch specifies Binary Mode. This means
- that both the from_string and the to_string must be
- specified as a series of hexadecimal numbers, in
- any of the formats shown:
- "1, 05, A5, D2,FF"
- "" (null string, allowed for to_string only)
- 1,4,4b,DF,0F
- "1, 4, 0d, 0 ,4 ,12, 14"
- The Binary Mode accepts leading zeros but does not
- require them. Individual hex byte values must be
- separated by commas. Any white space is optional.
- The following specification is, and has no commas
- separating the individual bytes:
- "1 5 d2c" ***INVALID***
- This one is OK, since there are only 2 real digits:
- "1, 5, 2c"
- Note that if you have no whitespace between hex
- byte values, neither the from_string nor the
- to_string need be in quotes. All of the following
- are just fine:
- BCHANGE foo boo 1,2,ff,4 1,2,fe,4 /b
- BCHANGE moo moo 0d,0a "" /b /i
- The first one does an automatic search and replace.
- The second one will effectively erase all CR/LF
- pairs in moo, prompting you before
- deleting each one.
-
-
- /i This is the Interactive Mode switch. Normally,
- BCHANGE will take your input and, as long as it's
- legal, do as well as it can. If, for example, the
- from_file is not present, BCHANGE will dump out
- with a nonzero ERRORLEVEL. But if the to_file
- already exists, BCHANGE will continue and just
- process the input file into a temporary file, then
- attempt to delete the existing to_file. If it can,
- BCHANGE will then rename the temporary file to the
- name you specified as the to_file. If it can't
- successfully do what you asked it to do, it will
- notify you by returning a nonzero ERRORLEVEL, and
- will tell how far it got and what file its output
- is in.
- Interactive Mode is a little different. First,
- it checks whether the to_file already exists (this
- will always be the case if you specify the same
- name for both the from_file and the to_file). If
- the to_file does exist already, BCHANGE will check
- with you before proceeding. The biggest difference
- is that Interactive Mode checks with you before
- making each replacement. If possible, it shows you
- the 96 bytes preceding and following the change
- string in both hexadecimal and ASCII form, and then
- gives you an option every time it finds the
- from_string. In these cases, you have three
- options, as follows:
- Y Yes. This substitutes the to_string
- for the from_string in the to_file.
- N No. This allows the from_string to
- pass unchanged into the to_file.
- * Yes forever. This performs the same
- substitution as 'Y', and also switches
- you from Interactive to Normal mode.
- You will be presented with no more
- options.
-
-
- NOTES
-
- ***Neither the file specifications (from_file and to_file) nor the options (/b
- and /i) are case sensitive.
-
- ***Note that BCHANGE does not alter a file in place, but makes a modified copy.
- This is true even if the same name is specified for the from_file and
- the to_file. Therefore, if the from_string and the to_string are
- different lengths, your file will change length and any internal
- offsets may be invalidated.
-
- ***Be careful when altering executable files. You will almost always run into
- trouble if you change the size or layout of an executable (.COM, .EXE,
- .SYS, .OVL, etc.) file. If you use BCHANGE on any executable file,
- you should specify a to_string equal in length to the from_string.
-
-
- VERSION HISTORY
-
- 1.0 Released January 25, 1989.
-
- 1.1 Released January 26, 1989. This version corrects two problems:
- 1) An empty to_string was causing a null byte to be written to the
- file. (Fixed)
- 2) Documentation stated that commas were optional between hex byte
- values. They are, in fact, mandatory. (Documentation changed)
-
-
- ASSISTANCE
-
- If you have trouble with BCHANGE, please contact me either through the
- mail, or send a message to me through CompuServe's EasyPlex mail service. My
- mail and E-mail box numbers are listed below. If you register, I will provide
- you with any necessary bug fixes.
- If I am notified of any problems, I will post an updated version of BCHANGE
- on CompuServe. The file name should be BCHGxx.ARC, where xx is the version
- number.
-
-
- SHAREWARE
-
- Well, here it is...the pitch. I'll keep it short (see WHINE.ARC for
- further details).
- This program took a lot of work to write. If I kept it for my own use
- only, relatively little effort would have had to go into such things as error
- correction, documentation, etc. I am busy enough that I could have used the
- time spent on such things in other ways. But I felt that enough people could
- get some use from it that the extra time was justified.
- I, and many like me, would like to be able to release useful utilities,
- tools and programs as shareware. But the time it takes to properly prepare a
- program for distribution means that without some way to compensate the authors,
- some helpful programs never get out. Maybe just the one you need?
- So vote with your dollars. Not many shareware authors are expecting to
- make a killing, so don't send us the titles to your cars and houses. The fee
- for BCHANGE is $15. If you register, please let me know what version of the
- program you have (1.1) so I can provide you with a new copy if necessary.
-
- Thanks...
-
- John Deurbrouck CSERVE 76530,371
- DMA
- Box 390
- Mountlake Terrace, WA 98043
-
- ----------------end-of-author's-documentation---------------
-
- Software Library Information:
-
- This disk copy provided as a service of
-
- The Public (Software) Library
-
- We are not the authors of this program, nor are we associated
- with the author in any way other than as a distributor of the
- program in accordance with the author's terms of distribution.
-
- Please direct shareware payments and specific questions about
- this program to the author of the program, whose name appears
- elsewhere in this documentation. If you have trouble getting
- in touch with the author, we will do whatever we can to help
- you with your questions. All programs have been tested and do
- run. To report problems, please use the form that is in the
- file PROBLEM.DOC on many of our disks or in other written for-
- mat with screen printouts, if possible. The P(s)L cannot de-
- bug programs over the telephone.
-
- Disks in the P(s)L are updated monthly, so if you did not get
- this disk directly from the P(s)L, you should be aware that
- the files in this set may no longer be the current versions.
-
- For a copy of the latest monthly software library newsletter
- and a list of the 1,600+ disks in the library, call or write
-
- The Public (Software) Library
- P.O.Box 35705 - F
- Houston, TX 77235-5705
- (713) 665-7017
-